package com.apes.framework.plugin.esb.processor;

import com.apes.framework.plugin.esb.api.Request;

import java.util.concurrent.CompletableFuture;

/**
 * 功能：异步调用
 *
 * @author xul
 * @create 2023-08-10 15:10
 */
public class AsyncProcessor<T extends Request, R> extends AbstractChainProcessor<T, R> {

    @Override
    public R process(T data) {
        CompletableFuture.runAsync(() -> super.process(data));
        return (R) data.getData();
    }

    @Override
    protected R doProcess(T data) {
        return null;
    }
}
